#!/bin/bash

javac RMI/Iserver.java
javac RMI/RMIServer.java

#rmic  RMI/RMIServer

javac -classpath . Principal/Main.java

#3. compilar RmiClient
javac -classpath . RMI/Client.java

#java -Djava.security.policy=no.policy Principal/Main 1 &

#java -Djava.security.policy=no.policy Principal/Main 2 &

#java -Djava.security.policy=no.policy Principal/Main 3 &

#java -Djava.security.policy=no.policy Principal/Main 4 &

#java -Djava.security.policy=no.policy Principal/Main 5 &

#java -Djava.security.policy=no.policy Principal/Main 6 &

#java -Djava.security.policy=no.policy Principal/Main 7 &

#java -Djava.security.policy=client.policy RmiClient


java -Djava.security.policy=no.policy -Djava.rmi.server.hostname=192.168.1.101 Principal/Main $1
